<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item,index) in swiper" :key="index">
        <img :src="item.picUrl" alt="">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
  import {mapState} from "vuex"
  export default {

    data() {
      return {

      }
    },
    computed: {
      ...mapState({
        swiper: state => state.homeSwiper.swiperList,
      })
    },
    mounted() {
      this.$store.dispatch('swiper')

    }
  }
</script>

<style lang='scss' scoped>
  .my-swipe {
    width: 100%;
    height: 8rem;

    img {
      height: 100%;
      width: 100%;
    }
  }
</style>